<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <!-- 引入react核心库 -->
    <script type="text/javascript" src="../../js/react17/react.development.js"></script>
    <!-- 用于支持react操作DOM -->
    <script type="text/javascript" src="../../js/react17/react-dom.development.js"></script>
    <!-- 用于将jsx转为js -->
    <script type="text/javascript" src="../../js/react17/babel.min.js"></script>
    <!-- 用于对组件标签属性进行限制 -->
    <script type="text/javascript" src="../../js/react17/prop-types.js"></script>
</head>
<body>
    <div id="test"></div>

    <script type="text/babel">
        class MyComponent extends React.Component{
            state = {}
            // 组件挂载后操作
            componentDidMount(){}
            // 组件即将卸载
            componentWillUnmount(){}
            
            render(){
                return
            }
            demo = ()=>{
                
            }
        }
        
        let p ={}
        ReactDOM.render(<MyComponent {...p}/>,document.getElementById("test"))
    </script>
</body>
<style>
</style>
</html>